Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Functions That Modify Movie Properties / Working With Media Samples


GetTrackDataSize

The GetTrackDataSize function allows your application to determine the size, in bytes, of the sample data in a segment of a track.

pascal long GetTrackDataSize (Track theTrack, TimeValue startTime, 
   
                              TimeValue duration);
theTrack
Specifies the track for this operation. You obtain this track identifier from such Movie Toolbox functions as NewMovieTrack and GetMovieTrack (described on page 2-136 and page 2-188, respectively).
startTime
Contains a time value specifying the starting point of the segment.
duration
Contains a time value that specifies the duration of the segment.
DESCRIPTION
The GetTrackDataSize function returns a long integer that contains the size, in bytes, of the track's sample data that lies in the specified segment.

This function counts each use of a sample. That is, if a track uses a given sample more than once, the size of that sample is included in the returned size value one time for each use. Consequently, the returned size is greater than or equal to the actual size of the track's sample data.

ERROR CODES
invalidTrack-2009This track is corrupted or invalid
invalidDuration-2014This duration value is invalid
invalidTime-2015This time value is invalid

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996